package com.ruoyi.purchase.service.impl;

import java.util.List;

import com.ruoyi.purchase.mapper.FirmAccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.domain.FirmAccount;
import com.ruoyi.purchase.service.IFirmAccountService;

/**
 * 结算账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-16
 */
@Service
public class FirmAccountServiceImpl implements IFirmAccountService 
{
    @Autowired
    private FirmAccountMapper firmAccountMapper;

    /**
     * 查询结算账户
     * 
     * @param id 结算账户主键
     * @return 结算账户
     */
    @Override
    public FirmAccount selectFirmAccountById(Long id)
    {
        return firmAccountMapper.selectFirmAccountById(id);
    }

    /**
     * 查询结算账户列表
     * 
     * @param firmAccount 结算账户
     * @return 结算账户
     */
    @Override
    public List<FirmAccount> selectFirmAccountList(FirmAccount firmAccount)
    {
        return firmAccountMapper.selectFirmAccountList(firmAccount);
    }

    /**
     * 新增结算账户
     * 
     * @param firmAccount 结算账户
     * @return 结果
     */
    @Override
    public int insertFirmAccount(FirmAccount firmAccount)
    {
        return firmAccountMapper.insertFirmAccount(firmAccount);
    }

    /**
     * 修改结算账户
     * 
     * @param firmAccount 结算账户
     * @return 结果
     */
    @Override
    public int updateFirmAccount(FirmAccount firmAccount)
    {
        return firmAccountMapper.updateFirmAccount(firmAccount);
    }

    /**
     * 批量删除结算账户
     * 
     * @param ids 需要删除的结算账户主键
     * @return 结果
     */
    @Override
    public int deleteFirmAccountByIds(Long[] ids)
    {
        return firmAccountMapper.deleteFirmAccountByIds(ids);
    }

    /**
     * 删除结算账户信息
     * 
     * @param id 结算账户主键
     * @return 结果
     */
    @Override
    public int deleteFirmAccountById(Long id)
    {
        return firmAccountMapper.deleteFirmAccountById(id);
    }
}
